The XFA form may look like a PDF, but it is not. It's a completely different type of form technology based on XML. Adobe has taken this technology and put a PDF shell around it. But the PDF part is just a shell. The form itself has nothing whatsoever to do with PDF.
XFA was repackaged years ago as ADM. If you want to create such a form, then get the ADM designer. However, the form will only work in the desktop Acrobat and Reader. It will not operate in any other PDF viewer, cause you know, it's not a PDF.
Please use all the code from the examples as you wish.
So now, the problem you've described is only slightly more complex than the one in the article. Everything you want to do is doable, but requires the proper data organization and code. For example, if there are several SNs for each thing, then replace SN with an array of SNs
2022: [ ["-","None"], ["TEST",[SN1,SN2,SN3]]],
That said, maybe a different approach would be better for you. Do you currently have a spreadsheet of all the delivered parts that includes the citys, years, etc? If that is the case then may be a better approach is to keep this flat structure and use a search to filter out the parts needed for each stage of the selections.
You'd need some code to automatically load the flat data into the PDF. Then custom code for searching the data for the data to display for a selection.
... View more